<?php

use \Welcomescreen\Agavi\Action;
use \Welcomescreen\Objects;

class Backend_Visits_DeleteAction extends Action\BackendBaseAction {
	public function executeWrite(AgaviWebRequestDataHolder $rd) {
		$ctx = $this->getContext();
		$visitManager = $ctx->getModel('VisitManager');
		$visit = $visitManager->getVisit($rd->getParameter('id'));
		$visitManager->delete($visit);
		
		return 'Success';
	}
	
	public function isSecure() {
		return true;
	}
}

?>